var currentOpenGroup = "none";
var currentDiv = "none";
var prevOpenImage = "none";
var noZoomImageLayer = "none";
var errorPopup = "none";
var yuiD = YAHOO.util.Dom;
var yuiE = YAHOO.util.Event;
function handleThumbClick(group, url, caption, element, sectionName, mediaID) {
	if (currentDiv != "none") { currentDiv.className = ""; }
	currentDiv = element.parentNode;
	currentDiv.className = "selected";
	document.getElementById(group + 'Caption').innerHTML = caption;
	document.getElementById(group + 'LargeImage').src = url;
	prevOpenImage.className = "highlightXLImage";
	document.getElementById(group + 'LargeImage').className = "highlightXLImage highLighted";
	openGroup(group);
	prevOpenImage = document.getElementById(group + 'LargeImage');

	return false;
}

function openGroup(group) {
	if (currentOpenGroup == group) {
		return;
	} else if (currentOpenGroup != "none") {
		closeGroup(currentOpenGroup);
	}
	document.getElementById(group + "LargeImageArea").style.display = "block";
	document.getElementById(group).className = "openPhotoSection";
	document.location= "#" + group + "Link";
	currentOpenGroup = group;
}

function closeGroup(group) {
	document.getElementById(group + "LargeImageArea").style.display = "none";
	document.getElementById(group).className = "photoSection";
}
